package com.yourenbang.lingyun.transaction.web.service.manage;

import com.yourenbang.lingyun.constants.enums.ServiceNameConstants;
import com.yourenbang.lingyun.core.base.interceptor.ExcludeInterceptor;
import com.yourenbang.lingyun.core.message.Result;
import com.yourenbang.lingyun.core.model.vo.PageVO;
import com.yourenbang.transaction.api.model.dto.fund.FundDetailDTO;
import com.yourenbang.transaction.api.model.dto.manage.*;
import com.yourenbang.transaction.api.model.vo.manage.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@FeignClient(value = ServiceNameConstants.SERVICE_TRANSACTION)
@RequestMapping("/service/transaction/manage")
public interface ManageService {

    /**
     * 导出机具对应提现表数据
     */
    @ExcludeInterceptor
    @GetMapping(value = "/export/withdraw/record")
    void exportDayWithdrawReport(QueryWithdrawTerDTO dto);

    /**
     * 查询机具对应提现表数据
     *
     * @return
     */
    @ExcludeInterceptor
    @GetMapping(value = "/get/withdraw/record")
    Result<List<QueryWithdrawTerVO>> getDayWithdrawReport(QueryWithdrawTerDTO dto);

    /**
     * 导出机具对应提现表数据-网商
     */
    @ExcludeInterceptor
    @GetMapping(value = "/export/withdraw/record/ws/{dayNum}")
    void exportDayWithdrawReportWs(@PathVariable("dayNum") Integer dayNum);

    /**
     * 导出机具对应提现表数据-喜乐付
     *
     * @return
     */
    @ExcludeInterceptor
    @GetMapping(value = "/export/withdraw/record/xlf/{dayNum}")
    void exportDayWithdrawReportXlf(@PathVariable("dayNum") Integer dayNum);

    /**
     * 查询资金账户
     *
     * @return
     */
    @ExcludeInterceptor
    @GetMapping("/list/account")
    Result<PageVO> getFundAccount(QueryFundAccountDTO dto);

    void exportSystemAccount(QueryFundAccountDTO dto);

    /**
     * 查询资金账户详情
     *
     * @return
     */
    @ExcludeInterceptor
    @PostMapping("/detail/sys/account")
    Result<QueryFundAccountDetailVO> getFundAccountDetail(@RequestBody FundDetailDTO fundDetailDTO);


    /**
     * 查询资金账户详情和流水
     *
     * @return
     */
    @ExcludeInterceptor
    @PostMapping("/detail/journal/sys/account")
    Result<QueryFundAccountDetailVO> getFundAccountDetailAndJournal(@RequestBody FundDetailDTO fundDetailDTO);

    /**
     * 查询系统资金账户类型
     *
     * @return
     */
    @ExcludeInterceptor
    @GetMapping("/get/sys/account/type")
    Result<List<QueryAccountTypeVO>> getFundAccountType(Short platNo);

    /**
     * 查询提现订单
     *
     * @param dto
     * @return
     */
    @ExcludeInterceptor
    @GetMapping("/list/withdraw")
    Result<PageVO> listWithdraw(QueryWithdrawListDTO dto);

    /**
     * 查询提现日结订单
     *
     * @param dto
     * @return
     */
    @ExcludeInterceptor
    @GetMapping("/list/t1/withdraw/bill")
    Result<PageVO> listT1WithdrawBill(QueryT1WithdrawBillDTO dto);

    /**
     * 导出提现订单
     * @param dto
     */
    @GetMapping(value = "/export/list/withdraw")
    void exportListWithdraw(ExportWithdrawListDTO dto);

    /**
     * 导出提现日结订单
     *
     * @param dto
     */
    @ExcludeInterceptor
    @GetMapping(value = "/export/list/t1/withdraw/bill")
    void exportListT1WithdrawBill(ExportT1WithdrawBillDTO dto);


    /**
     * 查询提现订单详情
     *
     * @param
     * @return
     */
    @ExcludeInterceptor
    @GetMapping("/detail/withdraw")
    Result<QueryWithdrawDetailVO> detailWithdraw(@RequestParam("fundAccountWithdrawPaymentId") Integer fundAccountWithdrawPaymentId,
                                                 @RequestParam("platNo") Integer platNo);

    /**
     * 查询押金列表
     *
     * @param dto
     * @return
     */
    @ExcludeInterceptor
    @GetMapping("/list/pledge")
    Result<PageVO> listPledge(QueryPledgeListDTO dto);

    /**
     * 导出押金列表
     *
     * @param dto
     * @return
     */
    @ExcludeInterceptor
    @GetMapping("/export/list/pledge")
    void exportListPledge(ExportPledgeListDTO dto);

    /**
     * 查询押金详情
     *
     * @param merchantId
     * @return
     */
    @ExcludeInterceptor
    @GetMapping("/detail/pledge")
    Result<QueryPledgeDetailVO> detailPledge(String merchantId);

    /**
     * 系统充值
     *
     * @param
     * @return
     */
    @ExcludeInterceptor
    @PostMapping("/topup/sys/account")
    Result<Void> topupSysAccount(@RequestBody TopupSysAccountDTO dto);
}
